<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.10.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SARibbon: SAColorPaletteGridWidget类 参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script type="text/javascript" src="clipboard.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="cookie.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="SA-logo.png"/></td>
  <td id="projectalign">
   <div id="projectname">SARibbon<span id="projectnumber">&#160;2.4.2</span>
   </div>
   <div id="projectbrief">SARibbon wiki</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.10.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search/",'.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){initNavTree('class_s_a_color_palette_grid_widget.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">类</a> &#124;
<a href="#signals">信号</a> &#124;
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="class_s_a_color_palette_grid_widget-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">SAColorPaletteGridWidget类 参考</div></div>
</div><!--header-->
<div class="contents">

<p>类似office的颜色选择窗口，有一排标准色，下面有一个颜色板，有3行浅色，有2行深色  
 <a href="#details">更多...</a></p>

<p><code>#include &lt;<a class="el" href="_s_a_color_palette_grid_widget_8h_source.html">SAColorPaletteGridWidget.h</a>&gt;</code></p>
<div class="dynheader">
类 SAColorPaletteGridWidget 继承关系图:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_s_a_color_palette_grid_widget.png" alt=""/>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="nested-classes" name="nested-classes"></a>
类</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">class &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_s_a_color_palette_grid_widget_1_1_private_data.html">PrivateData</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="signals" name="signals"></a>
信号</h2></td></tr>
<tr class="memitem:a017ac6a4775f0d4eb593fdba8653ff6c" id="r_a017ac6a4775f0d4eb593fdba8653ff6c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a017ac6a4775f0d4eb593fdba8653ff6c">colorClicked</a> (const QColor &amp;c)</td></tr>
<tr class="memdesc:a017ac6a4775f0d4eb593fdba8653ff6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">对于check模式，check的颜色触发的信号  <br /></td></tr>
<tr class="separator:a017ac6a4775f0d4eb593fdba8653ff6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:adcc16f7737ac6b084d8cbaf49a85badf" id="r_adcc16f7737ac6b084d8cbaf49a85badf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#adcc16f7737ac6b084d8cbaf49a85badf">SAColorPaletteGridWidget</a> (QWidget *par=nullptr)</td></tr>
<tr class="memdesc:adcc16f7737ac6b084d8cbaf49a85badf"><td class="mdescLeft">&#160;</td><td class="mdescRight">使用默认的标准颜色生成一个color palette  <br /></td></tr>
<tr class="separator:adcc16f7737ac6b084d8cbaf49a85badf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afaeda59713966924b08f10e375a02ca5" id="r_afaeda59713966924b08f10e375a02ca5"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afaeda59713966924b08f10e375a02ca5">SAColorPaletteGridWidget</a> (const QList&lt; QColor &gt; &amp;cls, QWidget *par=nullptr)</td></tr>
<tr class="memdesc:afaeda59713966924b08f10e375a02ca5"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据指定的颜色生成一个color palette  <br /></td></tr>
<tr class="separator:afaeda59713966924b08f10e375a02ca5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1fdda63682f76e961976db02d0acc9ce" id="r_a1fdda63682f76e961976db02d0acc9ce"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a1fdda63682f76e961976db02d0acc9ce">setColorList</a> (const QList&lt; QColor &gt; &amp;cls)</td></tr>
<tr class="memdesc:a1fdda63682f76e961976db02d0acc9ce"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置颜色系列，颜色系列的个数决定了主色卡的数量，palette色卡会根据factor进行生成  <br /></td></tr>
<tr class="separator:a1fdda63682f76e961976db02d0acc9ce"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e636f369136440d1a39d04cd5c0cb27" id="r_a9e636f369136440d1a39d04cd5c0cb27"><td class="memItemLeft" align="right" valign="top">QList&lt; QColor &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9e636f369136440d1a39d04cd5c0cb27">colorList</a> () const</td></tr>
<tr class="memdesc:a9e636f369136440d1a39d04cd5c0cb27"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取颜色系列  <br /></td></tr>
<tr class="separator:a9e636f369136440d1a39d04cd5c0cb27"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab63fd083037f13da444c0e7cd7fedab3" id="r_ab63fd083037f13da444c0e7cd7fedab3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab63fd083037f13da444c0e7cd7fedab3">setFactor</a> (const QList&lt; int &gt; &amp;<a class="el" href="#a9935e0919c95549f66e8a102c8d8cd8d">factor</a>)</td></tr>
<tr class="memdesc:ab63fd083037f13da444c0e7cd7fedab3"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置颜色深浅比例factor，factor决定了palette的行数，factor有5个，就有5行  <br /></td></tr>
<tr class="separator:ab63fd083037f13da444c0e7cd7fedab3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9935e0919c95549f66e8a102c8d8cd8d" id="r_a9935e0919c95549f66e8a102c8d8cd8d"><td class="memItemLeft" align="right" valign="top">QList&lt; int &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a9935e0919c95549f66e8a102c8d8cd8d">factor</a> () const</td></tr>
<tr class="memdesc:a9935e0919c95549f66e8a102c8d8cd8d"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取色卡  <br /></td></tr>
<tr class="separator:a9935e0919c95549f66e8a102c8d8cd8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af400118f66fd8c6e4fcbb73a734bda25" id="r_af400118f66fd8c6e4fcbb73a734bda25"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#af400118f66fd8c6e4fcbb73a734bda25">setColorIconSize</a> (const QSize &amp;s)</td></tr>
<tr class="memdesc:af400118f66fd8c6e4fcbb73a734bda25"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置颜色块的尺寸，默认为10*10  <br /></td></tr>
<tr class="separator:af400118f66fd8c6e4fcbb73a734bda25"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fb56748b39afda0a224aa8c18e09518" id="r_a4fb56748b39afda0a224aa8c18e09518"><td class="memItemLeft" align="right" valign="top"><a id="a4fb56748b39afda0a224aa8c18e09518" name="a4fb56748b39afda0a224aa8c18e09518"></a>
QSize&#160;</td><td class="memItemRight" valign="bottom"><b>colorIconSize</b> () const</td></tr>
<tr class="separator:a4fb56748b39afda0a224aa8c18e09518"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a71514433be63222cfcbf0e9f508b7053" id="r_a71514433be63222cfcbf0e9f508b7053"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a71514433be63222cfcbf0e9f508b7053">setColorCheckable</a> (bool on=true)</td></tr>
<tr class="memdesc:a71514433be63222cfcbf0e9f508b7053"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置颜色块是否能被checked  <br /></td></tr>
<tr class="separator:a71514433be63222cfcbf0e9f508b7053"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa14920a60bdf5fd3a703990467d0b09b" id="r_aa14920a60bdf5fd3a703990467d0b09b"><td class="memItemLeft" align="right" valign="top"><a id="aa14920a60bdf5fd3a703990467d0b09b" name="aa14920a60bdf5fd3a703990467d0b09b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>isColorCheckable</b> () const</td></tr>
<tr class="separator:aa14920a60bdf5fd3a703990467d0b09b"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p>类似office的颜色选择窗口，有一排标准色，下面有一个颜色板，有3行浅色，有2行深色 </p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="adcc16f7737ac6b084d8cbaf49a85badf" name="adcc16f7737ac6b084d8cbaf49a85badf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adcc16f7737ac6b084d8cbaf49a85badf">&#9670;&#160;</a></span>SAColorPaletteGridWidget() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SAColorPaletteGridWidget::SAColorPaletteGridWidget </td>
          <td>(</td>
          <td class="paramtype">QWidget *</td>          <td class="paramname"><span class="paramname"><em>par</em><span class="paramdefsep"> = </span><span class="paramdefval">nullptr</span></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>使用默认的标准颜色生成一个color palette </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">par</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="afaeda59713966924b08f10e375a02ca5" name="afaeda59713966924b08f10e375a02ca5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afaeda59713966924b08f10e375a02ca5">&#9670;&#160;</a></span>SAColorPaletteGridWidget() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">SAColorPaletteGridWidget::SAColorPaletteGridWidget </td>
          <td>(</td>
          <td class="paramtype">const QList&lt; QColor &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>cls</em>, </span></td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QWidget *</td>          <td class="paramname"><span class="paramname"><em>par</em><span class="paramdefsep"> = </span><span class="paramdefval">nullptr</span></span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据指定的颜色生成一个color palette </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cls</td><td></td></tr>
    <tr><td class="paramname">par</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="a017ac6a4775f0d4eb593fdba8653ff6c" name="a017ac6a4775f0d4eb593fdba8653ff6c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a017ac6a4775f0d4eb593fdba8653ff6c">&#9670;&#160;</a></span>colorClicked</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void SAColorPaletteGridWidget::colorClicked </td>
          <td>(</td>
          <td class="paramtype">const QColor &amp;</td>          <td class="paramname"><span class="paramname"><em>c</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">signal</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>对于check模式，check的颜色触发的信号 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">c</td><td></td></tr>
    <tr><td class="paramname">on</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a9e636f369136440d1a39d04cd5c0cb27" name="a9e636f369136440d1a39d04cd5c0cb27"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e636f369136440d1a39d04cd5c0cb27">&#9670;&#160;</a></span>colorList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; QColor &gt; SAColorPaletteGridWidget::colorList </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取颜色系列 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a9935e0919c95549f66e8a102c8d8cd8d" name="a9935e0919c95549f66e8a102c8d8cd8d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9935e0919c95549f66e8a102c8d8cd8d">&#9670;&#160;</a></span>factor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; int &gt; SAColorPaletteGridWidget::factor </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"></span></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取色卡 </p>
<dl class="section return"><dt>返回</dt><dd></dd></dl>

</div>
</div>
<a id="a71514433be63222cfcbf0e9f508b7053" name="a71514433be63222cfcbf0e9f508b7053"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a71514433be63222cfcbf0e9f508b7053">&#9670;&#160;</a></span>setColorCheckable()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAColorPaletteGridWidget::setColorCheckable </td>
          <td>(</td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>on</em><span class="paramdefsep"> = </span><span class="paramdefval">true</span></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置颜色块是否能被checked </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">on</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="af400118f66fd8c6e4fcbb73a734bda25" name="af400118f66fd8c6e4fcbb73a734bda25"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af400118f66fd8c6e4fcbb73a734bda25">&#9670;&#160;</a></span>setColorIconSize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAColorPaletteGridWidget::setColorIconSize </td>
          <td>(</td>
          <td class="paramtype">const QSize &amp;</td>          <td class="paramname"><span class="paramname"><em>s</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置颜色块的尺寸，默认为10*10 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">s</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="a1fdda63682f76e961976db02d0acc9ce" name="a1fdda63682f76e961976db02d0acc9ce"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1fdda63682f76e961976db02d0acc9ce">&#9670;&#160;</a></span>setColorList()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAColorPaletteGridWidget::setColorList </td>
          <td>(</td>
          <td class="paramtype">const QList&lt; QColor &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>cls</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置颜色系列，颜色系列的个数决定了主色卡的数量，palette色卡会根据factor进行生成 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">cls</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a id="ab63fd083037f13da444c0e7cd7fedab3" name="ab63fd083037f13da444c0e7cd7fedab3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab63fd083037f13da444c0e7cd7fedab3">&#9670;&#160;</a></span>setFactor()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SAColorPaletteGridWidget::setFactor </td>
          <td>(</td>
          <td class="paramtype">const QList&lt; int &gt; &amp;</td>          <td class="paramname"><span class="paramname"><em>factor</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置颜色深浅比例factor，factor决定了palette的行数，factor有5个，就有5行 </p>
<p>默认为{ 180, 160, 140, 75, 50 },相当于会有5行，每个系数会对标准颜色执行QColor::lighter操作 </p><dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">factor</td><td></td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/colorWidgets/<a class="el" href="_s_a_color_palette_grid_widget_8h_source.html">SAColorPaletteGridWidget.h</a></li>
<li>C:/src/Qt/SARibbon/src/SARibbonBar/colorWidgets/<b>SAColorPaletteGridWidget.cpp</b></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_s_a_color_palette_grid_widget.html">SAColorPaletteGridWidget</a></li>
    <li class="footer">制作者 <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.10.0 </li>
  </ul>
</div>
</body>
</html>
